package com.example.xiaomi.controller;
import com.example.xiaomi.entity.AdminInfo;
import com.example.xiaomi.service.LoginpowerService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("loginpower")
@RestController
@CrossOrigin

public class LoginpowerController {
    @Autowired
    private LoginpowerService service;

    @GetMapping("/login")
    public List<AdminInfo> getLoginInfo(String adminname){

        return service.findLoginInfo(adminname);
    }

}
